import request from './request'

export class SearchApi {
  static searchArticle = (keyword): Promise<IArticle[]> => {
    return request.get('/search/article', { params: { keyword } })
  }
  static getRecords(params): Promise<[ISearch[], number]> {
    return request.get('/search', { params })
  }
  static deleteRecord(id): Promise<ISearch> {
    return request.delete('/search/' + id)
  }
}